package com.hzit.hzb.core.properties;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import javax.swing.text.html.parser.Entity;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@Configuration
@ConfigurationProperties(prefix = "aliyun.oss")
@Data
public class OssProperties implements InitializingBean {

	private String endpoint;
	private String accessKey;
	private String accessSecret;
	private String bucketName;

	public static String ENDPOINT;
	public static String ACCESSKEY;
	public static String ACCESSSECRET;
	public static String BUCKETNAME;

	@Override
	public void afterPropertiesSet() throws Exception {
		ENDPOINT = endpoint;
		ACCESSKEY = accessKey;
		ACCESSSECRET = accessSecret;
		BUCKETNAME = bucketName;
	}
}
